FROM python:3.8-buster
LABEL author="zitong"


ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

COPY requirements.txt .
RUN pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

RUN set -ex \
    && useradd -g root -ms /bin/bash admin \
    && chmod 751 /home/admin

ENV LC_ALL=zh_CN.UTF-8 \
    PATH="/usr/local/python3/bin:/home/admin:${PATH}" \
    LD_LIBRARY_PATH=/home/admin/libs:${LA_LIBRARY_PATH} \
    HOME_PATH=/home/admin

WORKDIR /home/admin

